/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package heartsgamejava;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;

/**
 *
 * @author 0812627
 */
public class HeartsGameGraphics {
    private Graphics dbGraphic;
    private HeartsDeck heartsDeck = new HeartsDeck();
  

    public HeartsGameGraphics(Image image) {
        dbGraphic = image.getGraphics();
    }



    /**
     * @return the dbGraphic
     */
    public Graphics getDbGraphic() {
        return dbGraphic;
    }

    /**
     * @param dbGraphic the dbGraphic to set
     */
    public void setDbGraphic(Graphics dbGraphic) {
        this.dbGraphic = dbGraphic;
    }

    public void getGraphicsImage(Image image)
    {
        dbGraphic = image.getGraphics();

    }

    public void drawGraphics( HeartsGamePanel heartPanel) throws InterruptedException
    {
        
        
         //Các biến toàn cục của bài
        boolean [] isDraw = new boolean[3];
        Rectangle position = new Rectangle(300, 400, 200, 200);
        dbGraphic.clearRect(0, 0, HeartsStaticObject.PWIDTH, HeartsStaticObject.PHEIGHT);

        
        HeartsStaticObject.heartDeckStatic.drawFourPlayer(dbGraphic, heartPanel.getToolkit());

            HeartsCard heartsCard = new HeartsCard(1, 1);
            Point point = new Point(350, 190);


              // lá bài dưới
            //point.setLocation(410, 310);
            //heartsCard.drawCard(dbGraphic, heartPanel.getToolkit(), point);

            //lá bài bên trái
            point.setLocation(330, 250);
            //heartsCard.drawCard(dbGraphic, heartPanel.getToolkit(), point);



            // lá bài trên

            point.setLocation(410, 190);
            //heartsCard.drawCard(dbGraphic, heartPanel.getToolkit(), point);

          
          
            //lá bài bên phải
            point.setLocation(490, 250);
            //heartsCard.drawCard(dbGraphic, heartPanel.getToolkit(), point);

    }
}
